//
//  TextEditVC.m
//  KeleAppProject
//
//  Created by 周岑 on 2018/1/17.
//  Copyright © 2018年 Cen Zhou. All rights reserved.
//

#import "TextEditVC.h"

@interface TextEditVC ()

@end

@implementation TextEditVC

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    self.title = self.editType;
    self.view.backgroundColor = KLColor_C1;
    [self loadSubviewOnTextEdit];
}

- (void)loadSubviewOnTextEdit{
    UIView *editView = [[UIView alloc]init];
    editView.backgroundColor = [UIColor whiteColor];
    [self.view addSubview:editView];
    [editView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.right.equalTo(self.view);
        make.top.equalTo(self.view).offset(10*HEIGHT);
        make.height.mas_equalTo(100*HEIGHT);
    }];
    
    UITextView *textView = [[UITextView alloc]init];
    textView.backgroundColor = [UIColor whiteColor];
    textView.font = [UIFont fontWithName:@"PingFangSC-Regular" size:16*WIDTH];
    textView.textColor = KLColor_B6;
    [editView addSubview:textView];
    [textView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerX.equalTo(editView);
        make.top.equalTo(editView).offset(12*HEIGHT);
        make.width.mas_equalTo(345*WIDTH);
        make.height.mas_equalTo(60*HEIGHT);
    }];
    
    UILabel *counterLb = [[UILabel alloc]init];
    counterLb.text = @"30";
    counterLb.textColor = KLColor_B7;
    counterLb.font = [UIFont fontWithName:@"PingFangSC-Regular" size:14*WIDTH];
    [editView addSubview:counterLb];
    [counterLb mas_makeConstraints:^(MASConstraintMaker *make) {
        make.right.equalTo(textView);
        make.bottom.equalTo(editView).offset(-4*HEIGHT);
    }];
    
    UIButton *sureBtn = [UIButton buttonWithType:UIButtonTypeCustom];
    [sureBtn setTitle:@"确定" forState:UIControlStateNormal];
    [sureBtn setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
    sureBtn.backgroundColor = KLColor_A1;
    sureBtn.layer.masksToBounds = YES;
    sureBtn.layer.cornerRadius = 22*WIDTH;
    sureBtn.titleLabel.font = [UIFont fontWithName:@"PingFangSC-Regular" size:16*WIDTH];
    [self.view addSubview:sureBtn];
    [sureBtn mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerX.equalTo(self.view);
        make.top.equalTo(editView.mas_bottom).offset(56*HEIGHT);
        make.width.mas_equalTo(345*WIDTH);
        make.height.mas_equalTo(44*HEIGHT);
    }];
    
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
